package com.youko.backstage.mapper.commodity;


import com.youko.backstage.bean.commodity.CommoditySpu;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface CommoditySpuMapper {

    /**
     * 新增Spu
     */
    void insertSpu(CommoditySpu commoditySpu);

    /**
     * 更新Spu
     * @param id
     * @param goodsName
     * @param lowPrice
     * @param categoryId
     * @param brandId
     */
    void updateSpu(int id,String goodsName,float lowPrice,int categoryId,int brandId);

    /**
     * 删除Spu
     * @param id
     */
    void deleteSpu(int id);

    /**
     * 查找Spu
     * @param id
     * @return
     */
    CommoditySpu selectSpu(int id);

    /**
     * 查找所有Spu
     * @return
     */
    List<CommoditySpu> selectAllSpu();



}
